﻿@{
    ViewBag.Title = "作业动态";
    Layout = "~/Views/Shared/_Master.cshtml";
}
@using Models.WebSite_HaiSheng
@using Utilities
<script type="text/javascript">
    $(document).ready(function () {
        $('#banner').attr('src', '/images/xwbanner.jpg');
    });
</script>

<div class="sloed01 left">
      <div align="center"><img src="/images/xw1.png" width="185" height="57" /></div>
      <div class="fwmt">
        <ul>
          <li><a href=@Url.Action("News_Hots","Front")>热点信息</a></li>
          <li><a href=@Url.Action("News_WorkingNews", "Front")>作业动态</a></li>
        </ul>
      </div>
    </div>
<div class="sloed02 right">
   
    <div class="ftoyt">
        <h3>
            作业动态 PROJECT NEWS</h3>
    </div>
    <div class="nestw">
     <div class="texteb">
        您当前的位置：首页 > 综合新闻 > <span>作业动态</span></div>
        <ul>
            @{
                var items = CH.GetAllData<Article>(a => a.ArticleType == "作业动态").OrderByDescending(a => a.PubulishTime).ToList(); 
                int CurrentPage = ViewBag.CurrentPage == null ? 1 : (int)ViewBag.CurrentPage;
                int Size = 13;
                var count = items.Count % Size == 0 ? items.Count / Size : (items.Count / Size + 1);
                items = items.FindAll(msg => (items.IndexOf(msg)  >= (CurrentPage - 1) * Size) && (items.IndexOf(msg) + 1 <= (CurrentPage) * Size));

                foreach (var m in items)
                {
                <li><a  href=@Url.Action("News_Details", "Front", new { id = m.ID }) ><span>【@Utl.ShortTime(m.PubulishTime)】</span>@m.Title
                </a></li>
                }
            }
        </ul>
    </div>
    @Html.SimplePager(ViewBag.current == null ? 1 : (int)ViewBag.current, count, "/Front/News_WorkingNews/?pageid={0}", "pager")
    @* <div class="netxt">
        	
        </div>*@
</div>
